home *** CD-ROM | disk | FTP | other *** search
/ Graphics Plus / Graphics Plus.iso / general / fractal / kaos.lha / modellib / README < prev    next >
Encoding:
Text File  |  1990-01-19  |  5.6 KB  |  131 lines

  1. #########################################################################
  2. #       BUILT-IN DYNAMICAL SYSTEMS
  3. #########################################################################
  4.  
  5.         Lookup README file in ${KAOSHOME}/modellib directory for more
  6.         information on how many vector fields and maps are defined.
  7.          
  8.         The files starting with "generic_" are
  9.         those with examples of many different generic dynamical systems,
  10.         which can be copied to the user directory ${KAOSHOME}/modellib
  11.         and used as a template for entering your own dynamical system.
  12.         Choosing the right example from the list will reduce the amount of
  13.     time required to enter your own dynamical system.
  14.  
  15.     For more detailed info, look up the generic_def.c file and
  16.  
  17. #########################################################################
  18. #       DESCRIPTION OF BUILT-IN DYNAMICAL SYSTEMS
  19. #########################################################################
  20.          
  21.         Look up the file ending with .info
  22.         to get a description of a given dynamical system. 
  23.          
  24. #########################################################################
  25. #       BUILDING NEW DYNAMICAL SYSTEM CLASS
  26. #########################################################################
  27.  
  28.     You must have a write permission for some kaos files to change
  29.     parameters of the dynamical system class or build a new one.
  30.     Therefore, this customization requires that you have a private
  31.     copy of the entire source code of kaos in your local directory
  32.     or you have a super-user privilege.
  33.  
  34. It if often convenient to define a set of dynamical system classes with
  35. conveniently grouped dynamical systems. For example, one can define a
  36. set of dynamical system classes depending on  whether dynamical systems
  37. are mappings or vector fields, whether they are Hamiltonian or not, and
  38. whether they are from tutorial examples or from research projects,
  39. etc.  With fewer models installed at once, the program is smaller and
  40. runs faster.  Each dynamical system is defined by a small set of
  41. subroutines.  These subroutine modules can be inserted into and deleted
  42. from a given dynamical system class.  The  Makefile in the directory
  43. ${KAOSHOME}/modellib contains most of the instructions for installing
  44. dynamical system classes.
  45.  
  46. At the moment, the maximal dimensions of the phase, parameter, and function
  47. space for a given dynamical system classes are specified in the file
  48.  Makefile in the directory  $KAOSPATH/modellib. These can
  49. be easily changed by editing a line containing these definitions. Though
  50. this is much easier operation than what follows
  51. class, for the sake of completeness we present how to install
  52. the new dynamical system class in the following.
  53.  
  54. For example, in order to create and install a new class 
  55. with the class name  class_trial, follow the steps described below.
  56.  
  57. (1) Create the file  class_trial_model_labels.h with the title of
  58. a member dynamical system in each line. For example, the file should look like
  59.  
  60. Lorenz system 
  61. KO torus map
  62. Henon map
  63.  
  64. (2) Go to the file  Makefile in the directory  ${KAOSHOME}/modellib.
  65. Define the a new environmental variable CLASS_TRIAL as follows
  66.  
  67. CLASS_TRIAL = \
  68.     lorenz kotorusmap \\
  69.     henonmap
  70.  
  71. (3) Copy the set of commands for making the target  class_demo
  72. in  Makefile and change the name of the target to  class_trial.
  73. For example,
  74.  
  75. class_trial:\\
  76.     kwrite_init $@ 3 $CLASS_USER $CLASS_TRIAL\\
  77.     kwrite_def $@ 12 13 5 3 $CLASS_USER $CLASS_TRIAL\\
  78.     kwrite_model $@ $CLASS_USER $CLASS_TRIAL\\
  79.     kwrite_f $@ $CLASS_TRIAL\\
  80.     cp $@_kaos_init.h class_kaos_init.h\\
  81.     cp $@_kaos_def.h class_kaos_def.h\\
  82.     cp $@_kaos_model.h class_kaos_model.h\\
  83.     cp $@_choose_algorithm.c class_choose_algorithm.c\\
  84. Here,  $CLASS_USER is an environmental variable for a list of
  85. user defined dynamical systems, that is, 
  86.     userds0 userds1 userds2
  87.  
  88. The second argument of the command
  89. kwrite_init (here 3) denotes the index of the
  90. dynamical system class. Change this to a number that differs from 
  91. the indices of the other dynamical system classes.
  92.  
  93. The numerical arguments of the command
  94. kwrite_def (here 12 13 5 3) denote
  95. the maximal dimensions of the phase space, the parameter space, the function
  96. space, and the number of auxiliary windows, respectively. Edit these for the
  97. proper dimensions of the dynamical system class 
  98. to be installed in  class_trial.
  99. Note that changing the values of these arguments for the existing dynamical
  100. system class will change the corresponding maximal dimension of the spaces.
  101.  
  102. (4) In the directory  ${KAOSHOME}/modellib,
  103. type  make class_trial to create the new dynamical system class. 
  104. This creates a set of temporary files looked up by kaos;
  105.  class_trial_kaos_def.h,  class_trial_kaos_init.h,
  106.  class_trial_kaos_model.h, and 
  107.  class_def.c.
  108.  
  109. Some constants in the temporary files which are
  110. automatically created by "make" and are explained below.
  111.  
  112. File class_trial_kaos_def.h
  113. ---------------------------
  114.  MODEL_DIM - the number of dynamical systems in the class
  115.  
  116.  MODEL_LABELS - a set of labels for the dynamical systems in the class
  117.  
  118.  dsclass variable - the index for a user dynamical system class 
  119.  
  120. File class_trial_kaos_init.h
  121. ---------------------------
  122.  init_tbl - a list of dynamical systems
  123. contained in a user dynamical system class.  
  124. Substitute the existing ones with names of the
  125. dynamical systems in your user dynamical system class. The number and order of entries are important. The total number of entries should be  MODEL_DIM 
  126. as defined in  class_trial_kaos_def.h.
  127.  
  128.  *_init(),*_f(),*_func() - their names need to be changed to the names
  129. of the dynamical systems in your user dynamical system class.  Note
  130. that all these subroutines have to be declared to return an integer.
  131.